package com.xd.springaiagent.tools.tavily;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(TavilySearchProperties.class)
public class TavilyAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public TavilySearchApi tavilySearchApi(TavilySearchProperties properties) {
        return new TavilySearchApi(properties);
    }

}